//
//  BHFunCreateRowModel.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/6/24.
//

import UIKit

class BHFunCreateRowModel: NSObject {
    var name: String = ""
    
    // cell类型  1输入框 2选择点击 3switch 4特殊的选择地址
    var type: Int = 0
    
    // 输入框类型的是否能编辑
    var canTextEdite: Bool = true
    
    // 输入框类型的键盘
    var keyBoardType: UIKeyboardType = .default
    
    
    static var createFun: [[BHFunCreateRowModel]] {
        get {
            var array1: [BHFunCreateRowModel] = []
            let sec_one_row1: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_one_row1.name = "活动名称"
            sec_one_row1.type = 1
            
            let sec_one_row2: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_one_row2.name = "活动类型"
            sec_one_row2.type = 2
            
            array1.append(sec_one_row1)
            array1.append(sec_one_row2)
            
            
            var array2: [BHFunCreateRowModel] = []
            let sec_two_row1: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_two_row1.type = 1
            sec_two_row1.name = "活动开始时间"
            sec_two_row1.canTextEdite = false
            
//            let sec_two_row2: BHFunCreateRowModel = BHFunCreateRowModel.init()
//            sec_two_row2.type = 1
//            sec_two_row2.name = "活动结束时间"
//            sec_two_row2.canTextEdite = false
            
            let sec_two_row3: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_two_row3.type = 1
            sec_two_row3.name = "报名截止时间"
            sec_two_row3.canTextEdite = false
            
            let sec_two_row4: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_two_row4.type = 1
            sec_two_row4.canTextEdite = true
            sec_two_row4.name = "活动人数限制"
            sec_two_row4.keyBoardType = .numberPad
            
            array2.append(sec_two_row1)
//            array2.append(sec_two_row2)
            array2.append(sec_two_row3)
            array2.append(sec_two_row4)

            var array3: [BHFunCreateRowModel] = []
            let sec_three_row1: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_three_row1.type = 4
            array3.append(sec_three_row1)

            var array4: [BHFunCreateRowModel] = []
            let sec_four_row1: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_four_row1.type = 3
            sec_four_row1.name = "是否需要报名费"
            
            let sec_four_row2: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_four_row2.type = 3
            sec_four_row2.name = "报名费（元）"
            sec_four_row2.canTextEdite = true
            sec_four_row2.type = 1
            sec_four_row2.keyBoardType = .decimalPad

            array4.append(sec_four_row1)
            array4.append(sec_four_row2)

            
            var array5: [BHFunCreateRowModel] = []
            let sec_five_row1: BHFunCreateRowModel = BHFunCreateRowModel.init()
            sec_five_row1.type = 1
            sec_five_row1.keyBoardType = .numberPad
            sec_four_row2.canTextEdite = true
            sec_five_row1.name = "联系方式"
            array5.append(sec_five_row1)
            
            return [array1,array2,array3,array4,array5]
        }
    }
}


class BHFunAddNewModel: NSObject {
    var name: String = ""
    var type: Int = 0
    var typeName: String = ""
    
    var begainTime: String = ""
    var endTime: String = ""
    var applyEndTime: String = ""
    var maxCout: Int = 0
    
    var addressModel: BHFunAddressModel?
    
    // 是否需要报名费
    var needCash: Bool = false
    var cost: String = ""
    
    var phone: String = ""
    
    var mark: String = ""
    
    
}


class BHFunAddressModel: NSObject {
    
}
